#include"PthreadPool.hpp"
using namespace PthreadPoolModule;
#include<functional>
using task_t = std::function<void(void)>;

void Save()
{
    LOG(LogModule::LogLevel::INFOMATION)<<"保存工作开始....";
    sleep(1);
}

void Delete()
{
    LOG(LogModule::LogLevel::INFOMATION)<<"删除工作开始....";
    sleep(1);
}

void Modify()
{
    LOG(LogModule::LogLevel::INFOMATION)<<"修改工作开始....";
    sleep(1);
}

int main()
{
    LOG_CONSOLE();

    PthreadPool<task_t> * p=new PthreadPool<task_t>();

    // PthreadPool<task_t>::getInstance()->Enque(Save);
    // sleep(1);
    // PthreadPool<task_t>::getInstance()->Enque(Modify);
    // sleep(1);
    // PthreadPool<task_t>::getInstance()->Enque(Delete);

    // PthreadPool<task_t>::getInstance()->Join();




    return 0;
}